package com.justech.tcp.server.parse;


import java.util.List;

/**
 * @author feifei.li
 */
public class EquipmentInfo {

    /**
     * 设备名称
     **/
    private String equipmentName;

    /**
     * 机台SN
     **/
    private String sn;

    /**
     * 数据类型
     **/
    private String dataType;

    /**
     * 当前计数
     **/
    private int index;

    /**
     * 数据总量
     **/
    private int length;
    private StringArrayList<Object> data;

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public List<Object> getData() {
        return data;
    }

    public void setData(StringArrayList<Object> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        StringArrayList stringList = (StringArrayList) data;
        return "{" +
                "\"equipmentName\":\"" + equipmentName + "\"" +
                ", \"sn\":\"" + sn + "\"" +
                ", \"dataType\":\"" + dataType + "\"" +
                ", \"index\":" + index +
                ", \"length\":" + length +
                ", \"data\":" + stringList +
                '}';
    }
}
